home *** CD-ROM | disk | FTP | other *** search
- on(keyPress "<Enter>"){
- if(buynum <= 200)
- {
- if(this._parent.itemselect1.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo1) >= buynum)
- {
- if(_root.money <= this._parent.itemcostshow1 * buynum)
- {
- _root.alertbox("您的金錢不足!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- else
- {
- trace("花了" + this._parent.itemcostshow1 * buynum + "楓幣~");
- trace("買了\"" + this._parent.shopitemname1 + "\"" + buynum + "個");
- _root.newitem(buynum,this._parent.itemshowgo1,this._parent.itemdessave1,this._parent.shopitemname1,this._parent.itemcostshow1);
- _root.money -= this._parent.itemcostshow1 * buynum;
- this._visible = 0;
- _root.buynum = 1;
- }
- }
- else if(this._parent.itemselect2.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo2) >= buynum)
- {
- if(_root.money <= this._parent.itemcostshow2 * buynum)
- {
- _root.alertbox("您的金錢不足!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- else
- {
- trace("花了" + this._parent.itemcostshow2 * buynum + "楓幣~");
- trace("買了\"" + this._parent.shopitemname2 + "\"" + buynum + "個");
- _root.newitem(buynum,this._parent.itemshowgo2,this._parent.itemdessave2,this._parent.shopitemname2,this._parent.itemcostshow2);
- _root.money -= this._parent.itemcostshow2 * buynum;
- this._visible = 0;
- _root.buynum = 1;
- }
- }
- else if(this._parent.itemselect3.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo3) >= buynum)
- {
- if(_root.money <= this._parent.itemcostshow3 * buynum)
- {
- _root.alertbox("您的金錢不足!!");
- this._visible = 0;
- _root.buynum = 1;
- }
- else
- {
- trace("花了" + this._parent.itemcostshow3 * buynum + "楓幣~");
- trace("買了\"" + this._parent.shopitemname3 + "\"" + buynum + "個");
- _root.newitem(buynum,this._parent.itemshowgo3,this._parent.itemdessave3,this._parent.shopitemname3,this._parent.itemcostshow3);
- _root.money -= this._parent.itemcostshow3 * buynum;
- this._visible = 0;
- _root.buynum = 1;
- }
- }
- else if(this._parent.itemselect4.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo4) >= buynum)
- {
- if(_root.money <= this._parent.itemcostshow4 * buynum)
- {
- _root.alertbox("您的金錢不足!!");
- this._visible = 0;
- _root.buynum = 1;
- }
- else
- {
- trace("花了" + this._parent.itemcostshow4 * buynum + "楓幣~");
- trace("買了\"" + this._parent.shopitemname4 + "\"" + buynum + "個");
- _root.newitem(buynum,this._parent.itemshowgo4,this._parent.itemdessave4,this._parent.shopitemname4,this._parent.itemcostshow4);
- _root.money -= this._parent.itemcostshow4 * buynum;
- this._visible = 0;
- _root.buynum = 1;
- }
- }
- else if(this._parent.itemselect5.select == true && _root.previewitemaddavaible(buynum,this._parent.itemshowgo5) >= buynum)
- {
- if(_root.money <= this._parent.itemcostshow5 * buynum)
- {
- _root.alertbox("您的金錢不足!!");
- this._visible = 0;
- _root.buynum = 1;
- }
- else
- {
- trace("花了" + this._parent.itemcostshow5 * buynum + "楓幣~");
- trace("買了\"" + this._parent.shopitemname5 + "\"" + buynum + "個");
- _root.newitem(buynum,this._parent.itemshowgo5,this._parent.itemdessave5,this._parent.shopitemname5,this._parent.itemcostshow5);
- _root.money -= this._parent.itemcostshow5 * buynum;
- this._visible = 0;
- _root.buynum = 1;
- }
- }
- else if(this._parent.itemselect1.select == true)
- {
- _root.alertbox("道具欄位不夠放置!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- else if(this._parent.itemselect2.select == true)
- {
- _root.alertbox("道具欄位不夠放置!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- else if(this._parent.itemselect3.select == true)
- {
- _root.alertbox("道具欄位不夠放置!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- else if(this._parent.itemselect4.select == true)
- {
- _root.alertbox("道具欄位不夠放置!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- else if(this._parent.itemselect5.select == true)
- {
- _root.alertbox("道具欄位不夠放置!!");
- _root.buynum = 1;
- this._visible = 0;
- }
- }
- else
- {
- _root.alertbox("您購買的數量太多,請分批購買!!");
- this._visible = 0;
- _root.buynum = 1;
- }
- }
-